package com.quanxiaoha.framework.redis.constant;


/**
 * @Author: jingyan_liu
 * @CreateTime: 2025-07-09
 * @Description:
 * @Version: 1.0
 */

public class RedisKeyConstants {
	
	public static final String NOTE_DETAIL_KEY = "note:detail:";
	private static final String VERIFICATION_CODE_KEY_PREFIX = "verification.code:";
	private static final String USER_ROLES_KEY_PREFIX = "user:roles:";
	private static final String ROLE_PERMISSIONS_KEY_PREFIX = "role:permissions:";
	private static final String USER_INFO_KEY_PREFIX = "user:info:";
	
	public static String buildVerificationCodeKey(String phone) {
		return VERIFICATION_CODE_KEY_PREFIX + phone;
	}
	
	public static String buildUserRoleKey(Long userId) {
		return USER_ROLES_KEY_PREFIX + userId;
	}
	
	public static String buildRolePermissionsKey(String roleKey) {
		return ROLE_PERMISSIONS_KEY_PREFIX + roleKey;
	}
	
	public static String buildUserInfoKey(Long userId) {
		return USER_INFO_KEY_PREFIX + userId;
	}
	
	public static String buildNoteDetailKey(Long noteId) {
		return NOTE_DETAIL_KEY + noteId;
	}
	
}
